<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<title>沙立方</title>
		<meta name="description" content="">
		<meta name="keywords" content="">
		<meta name="renderer" content="webkit">
		<!-- 设置缩放 -->
		<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, minimal-ui" />
		<!-- 可隐藏地址栏，仅针对IOS的Safari（注：IOS7.0版本以后，safari上已看不到效果） -->
		<meta name="apple-mobile-web-app-capable" content="yes" />
		<!-- 仅针对IOS的Safari顶端状态条的样式（可选default/black/black-translucent ） -->
		<meta name="apple-mobile-web-app-status-bar-style" content="black" />
		<!-- IOS中禁用将数字识别为电话号码/忽略Android平台中对邮箱地址的识别 -->
		<meta name="format-detection" content="telephone=no, email=no" />
		<!-- 启用360浏览器的极速模式(webkit) -->
		<meta name="renderer" content="webkit">
		<!-- 避免IE使用兼容模式 -->
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<!-- 针对手持设备优化，主要是针对一些老的不识别viewport的浏览器，比如黑莓 -->
		<meta name="HandheldFriendly" content="true">
		<!-- 微软的老式浏览器 -->
		<meta name="MobileOptimized" content="320">
		<!-- uc强制竖屏 -->
		<meta name="screen-orientation" content="portrait">
		<!-- QQ强制竖屏 -->
		<meta name="x5-orientation" content="portrait">
		<!-- UC强制全屏 -->
		<meta name="full-screen" content="yes">
		<!-- QQ强制全屏 -->
		<meta name="x5-fullscreen" content="true">
		<!-- UC应用模式 -->
		<meta name="browsermode" content="application">
		<!-- QQ应用模式 -->
		<meta name="x5-page-mode" content="app">
		<!-- windows phone 点击无高光 -->
		<meta name="msapplication-tap-highlight" content="no">
		<meta http-equiv="Cache-Control" content="no-siteapp" />
		<link rel="stylesheet" href="../../assets/city/jquery-weui.min.css" />
		<link rel="icon" type="image/png" href="../../assets/i/favicon.png">
		<link rel="stylesheet" href="../../assets/css/amazeui.min.css" />
		<link rel="stylesheet" href="../../assets/css/app.css">
		<link rel="stylesheet" href="../../assets/css/yttApp.css">
		<style>
		   .weui-picker-modal.picker-columns.city-picker.weui-picker-modal-visible{bottom:49px!important;}
		</style>
	</head>

	<body class="bg-FFFBF2 curProgress">
		<header data-am-widget="header" class="am-header bg-white am-header-fixed bg-085492">
			<div class="am-header-left am-header-nav text-black am-header-left padding-left05" id="goBackDivs">
				<a  href="javascript:history.go(-1)" class="text-black" id="goBackIcon">
				  	<i class="am-align-left am-margin-0 am-icon-angle-left am-icon-md text-black co-fff"></i>
				  </a> 
			</div>
			<h1 class="am-header-title teblack">
				<a href="#title-link" class="co-fff">课程进度</a>
			</h1>
		</header>
		<div class="am-container am-padding-0">
			<ul class="courseUl am-avg-sm-3 am-margin-top-xs" id="courseDiv">
			    <!-- <li class="courseLi">
			        <div class="courseDiv">
			            <span class="courseName">水花课程</span>
			            <span class="courseNum">（剩余5节课）</span>
			        </div>
			    </li> -->
			</ul>
		</div>
		<div class="am-modal am-modal-loading am-modal-no-btn radius4" tabindex="-1" id="my-modal-loading" data-am-modal="{target: '#my-modal-loading'}">
		  <div class="am-modal-dialog" style="border-radius: 4px;">
		    	<div class="am-modal-hd">加载中...</div>
			    <div class="am-modal-bd">
			      <span class="am-icon-spinner am-icon-spin"></span>
			    </div>
		  </div>
		</div>
		
		<div class="am-modal am-modal-alert" tabindex="-1" id="alert1">
		  <div class="am-modal-dialog" style="border-radius: 4px;">
		    	<div class="am-modal-hd"></div>
			   	<div class="am-modal-bd alert1"></div>
		   		<div class="am-modal-footer">
		      		<span class="am-modal-btn">确定</span>
		    	</div>
	  		</div>
		</div>
		<script src="../../assets/js/jquery.min.js"></script>
		<script src="../../assets/js/jquery.cookie.js"></script>
		<script src="../../assets/city/jquery-weui.min.js"></script>
		<script src="../../assets/city/city-picker.min.js"></script>
		<script src="../../assets/js/amazeui.min.js"></script>
		<script src="../../assets/js/fastclick.min.js"></script>
		<script src="../../js/comm.js"></script>
		<script src="../../js/slf.js"></script>
		<script>
		     var childrenId=slf.getQueryStringByName("childrenId");
		     $(function(){
		    	 slf.ajax({
		    			url : "/myCenter/getUserChildrenCourse",
		    			param : {
		    				type:1,
		    				children:childrenId,
		    			},
		    			success : function(data){
		    				var html=""
		    				if (data.res > 0) {
		    					var html = "";
		    	                var list = data.obj[0];
		    	                console.log(data.obj[0])
		    	                console.log(list.childrenCoursePage.length+"bbbbbbbbb");
		    	                console.log(list.schoolCoursePage.length+"cccccccccccc");
		    	                if(list.childrenCoursePage.length>0){
		    	                	for(var i=0;i<list.childrenCoursePage.length;i++){
		    	                		html+='<li class="courseLi" onclick="coursePack('+list.childrenCoursePage[i].coursePageId+')">'
    			    	                html+='<div class="courseDiv">'
    			    	                html+='<span class="courseName">'+list.childrenCoursePage[i].name+'</span>'    
    			    	                html+='<span class="courseNum">（剩余'+list.childrenCoursePage[i].count+'节课）</span>'    
    			    	                html+='</div></li>'
		    	                	}
		    	                }
		    	                if(list.schoolCoursePage.length>0){
		    	                	for(var i=0;i<list.schoolCoursePage.length;i++){
		    	                		html+='<li class="courseLi" onclick="course('+list.schoolCoursePage[i].courseId+')">'
    			    	                html+='<div class="courseDiv">'
    			    	                html+='<span class="courseName">'+list.schoolCoursePage[i].name+'</span>'    
    			    	                html+='<span class="courseNum">（共计1节）</span>'    
    			    	                html+='</div></li>'
		    	                	}
		    	                }
		    	                $("#courseDiv").append(html)
		    				}
		    			}
		    		});
		     })
		     function coursePack(coursePage){
		    	 window.location.href="../basepkg.html?coursePage="+coursePage+""
		     }
		     function course(courseId){
		    	 window.location.href="../basepkg_details.html?courseId="+courseId+'&flag='+1+""
		     }
		</script>
	</body>

</html>